<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>


<title>登录页面</title>
</head>

<script>
	$(function(){
		var msg = "${msg}";
		if(msg.length != 0){
			$("span.errorMessage").html(msg);
			$("div.loginErrorMessageDiv").show();
		}
		
		$("form.loginForm").submit(function(){
			if($("#name").val().length == 0 || $("#password").val().length==0){
				$("span.errorMessage").html("请输入账号密码");
	            $("div.loginErrorMessageDiv").show();           
	            return false;
			}
			return true;
		});
		
		$("form.loginForm input").keyup(function(e){
			if(e.keyCode != 13){
				$("div.loginErrorMessageDiv").hide();
			}
			
		});
		
		var left = window.innerWidth/2+162;
		$("div.loginSmallDiv").css("left",left);
	})
</script>
<div id="loginDiv">
    <div class="simpleLogo">
        <a href="forehome" ><img src="./img/site/simpleLogo.png"></a>
    </div>
    <img src="./img/site/loginBackground.png" class="loginBackgroundImg" id="loginBackgroundImg">
    
    <form action="forelogin" class="loginForm" method="post">
        <div class="loginSmallDiv" id="loginSmallDiv">
        	<div class="loginErrorMessageDiv">
                <div class="alert alert-danger" >
                  <button type="button" class="close" data-dismiss="alert" aria-label="Close"></button>
                    <span class="errorMessage"></span>
                </div>
            </div>
        
            <div class="login_acount_text">账户登录</div>
            <div class="loginInput ">
                <span class="loginInputIcon ">
                    <span class=" glyphicon glyphicon-user"></span>
                </span>
                <input type="text" placeholder="手机/会员名/邮箱" name="user.name" id="name">         
            </div>
            <div class="loginInput ">
                <span class="loginInputIcon ">
                    <span class=" glyphicon glyphicon-lock"></span>
                </span>
                <input type="password" placeholder="密码" name="user.password" id="password">            
            </div>
            <div>
                <a href="#nowhere" class="notImplementLink">忘记登录密码</a> 
                <a class="pull-right" href="#nowhere">免费注册</a> 
            </div>
            <div style="margin-top:20px">
                <button type="submit" class="btn btn-block redButton">登录</button>
            </div>
        </div>   
      </form> 
</div>
</html>